﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using KaoWuYouLibs.Dal;
using KaoWuYouLibs.Model;

namespace KaoWuYouLibs.Bll
{
    public class AccountManagementBusiness
    {
        WebUserAccess access = new WebUserAccess();

        public bool DeleteWebUser(string AccountName) 
        {
            try
            {
                return access.DeleteWebUser(AccountName);
            }
            catch (Exception ex) 
            {
                return false;
            }
        }

        public List<WebUserModel> UserQueryByLastLoginDate(int TimeSpan)
        {
            DateTime expirationTime = DateTime.Now.AddYears(-TimeSpan);
            return access.UserQueryByLastLoginDate(expirationTime);
        }
    }
}
